package io.geekidea.boot.shop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.geekidea.boot.shop.entity.Address;
import io.geekidea.boot.shop.query.app.AppAddressQuery;
import io.geekidea.boot.shop.query.web.AddressQuery;
import io.geekidea.boot.shop.vo.app.AppAddressVo;
import io.geekidea.boot.shop.vo.web.AddressVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 收货地址 Mapper 接口
 *
 * @author geekidea
 * @since 2024-10-27
 */
@Mapper
public interface AddressMapper extends BaseMapper<Address> {

    /**
     * 收货地址详情
     *
     * @param id
     * @return
     */
    AddressVo getAddressById(Integer id);

    /**
     * 收货地址分页列表
     *
     * @param query
     * @return
     */
    List<AddressVo> getAddressPage(AddressQuery query);

    /**
     * App收货地址详情
     *
     * @param id
     * @return
     */
    AppAddressVo getAppAddressById(Integer id);

    /**
     * App收货地址分页列表
     *
     * @param query
     * @return
     */
    List<AppAddressVo> getAppAddressPage(AppAddressQuery query);

}
